﻿namespace Yz.Base
{
    public class VmReturn : ViewModel
    {
        /// <summary>
        /// 是否成功
        /// </summary>
        public bool Suc { get; set; }
        /// <summary>
        /// 消息
        /// </summary>
        public string Msg { get; set; }
    }

    public class VmData : VmReturn
    {
        /// <summary>
        /// 数据
        /// </summary>
        public dynamic Data { get; set; }
    }
    public class VmList : VmReturn
    {
        /// <summary>
        /// 数据集合
        /// </summary>
        public dynamic List { get; set; }
    }
    public class VmPageList : VmList
    {
        /// <summary>
        /// 数量
        /// </summary>
        public int Total { get; set; }
    }
    /// <summary>
    /// 单个model的数据
    /// </summary>
    /// <typeparam name="T"></typeparam>
    public class VmData<T> : VmReturn where T : ViewModel
    {
        /// <summary>
        /// 数据
        /// </summary>
        public T Data { get; set; }
    }
    public class VmList<T> : VmReturn where T : ViewModel
    {
        /// <summary>
        /// 数据集合
        /// </summary>
        public List<T> List { get; set; }
    }

    public class VmCount : VmReturn
    {
        /// <summary>
        /// 数量
        /// </summary>
        public int Total { get; set; }
    }

    public class VmPageList<T> : VmList<T> where T : ViewModel
    {
        /// <summary>
        /// 数量
        /// </summary>
        public int Total { get; set; }
    }
}
